package com.kuaidi100.sdk.response;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * @Author: ligl
 * @Date: 2022-04-26 15:57
 */
public class ThirdPlatformRestData {
    /**
     * 快递公司编码
     */
    private String com;
    /**
     * 快递公司名称
     */
    private String comName;
    /**
     * 快递公司网点列表
     */
    private List<BranchAccount> branchAccounts;

    @Override
    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception e) {
            return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                    .append("com", com)
                    .append("comName", comName)
                    .append("branchAccounts", branchAccounts)
                    .toString();
        }
    }

    public String getCom() {
        return com;
    }

    public void setCom(String com) {
        this.com = com;
    }

    public String getComName() {
        return comName;
    }

    public void setComName(String comName) {
        this.comName = comName;
    }

    public List<BranchAccount> getBranchAccounts() {
        return branchAccounts;
    }

    public void setBranchAccounts(List<BranchAccount> branchAccounts) {
        this.branchAccounts = branchAccounts;
    }
}
